import { GaRegExp, ruleInject, ruleInjectable } from "../../InjectionRule";
import { blankRemove } from "../../methods/blank-remove";
import { MakeListRule } from "../../methods/make-list";

@ruleInjectable()
export default class genericRule extends GaRegExp {

	@ruleInject() private variableNameRule!: GaRegExp;

	public RuleInit() {
		this.ParseRule([
			"(", this.Supply("GENERIC"),
			"(-", "\\<", ...MakeListRule([this.variableNameRule]), "\\>", blankRemove, "|", "()", ")",
			")",
		]);
	}

}
